//初始化云端数据库
const db = wx.cloud.database();
//获取云端数据库集合
const product1 = db.collection("product1");
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },
  /*提交按钮的逻辑结构 */
  onSumbit: function (event) {
    console.log(event.detail.value);
    product1.add({
      data: {
        name: event.detail.value.name,
        price: event.detail.value.price,
        dec: event.detail.value.dec,
        src: event.detail.value.src,
        lbtsrc01: event.detail.value.lbtsrc01,
        lbtsrc02: event.detail.value.lbtsrc02,
        lbtsrc03: event.detail.value.lbtsrc03,
        isMeifu: event.detail.value.isMeifu,
        isShoushen: event.detail.value.isShoushen,
        isKangai: event.detail.value.isKangai,
        isJiangya: event.detail.value.isJiangya
        
      }
    }).then(res => {
      console.log(res)
    })
  }

})